from PyQt5.QtWidgets import QApplication,QWidget,QLabel,QPushButton
import sys

class Window(QWidget):

    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        # 创建标签
        label1 = QLabel('账号:',self)
        # 定位
        label1.move(50,50)

        # 创建按钮
        btn1 = QPushButton('按钮',self)
        btn1.move(100,100)

        self.setGeometry(1000,300,300,200)
        self.setWindowTitle('绝对定位')
        self.show()

if __name__ == "__main__":
    app = QApplication(sys.argv)
    w = Window()
    app.exec()